var btnInfo = document.querySelectorAll(".table-info button");
var bodyTag = document.querySelector("body");
var modal = document.querySelector(".modal-box");
var release = document.querySelectorAll("#release_main .info td");

function show_modal() {
	var infoText = this.parentNode.parentNode.innerText;
	var infos = infoText.replace(/(\s|\n)+/g, " ").split(" ");
	modal.querySelector("h4").innerHTML = infos[1];
	release[0].innerText = infos[4];
	release[1].innerText = infos[3];
	release[2].innerHTML = infos[2];
	release[3].innerHTML = infos[6]
	bodyTag.style.overflow = "hidden";
	modal.className = "modal-box show";
}

for(var i = 0; i < btnInfo.length; i++) {
	var ele = btnInfo[i];
	ele.addEventListener("click", show_modal);
}

modal.querySelector(".modal-footer button").addEventListener("click", function() {
	bodyTag.style.overflow = "auto";
	modal.className = "modal-box";
});